﻿{extend name="layout/main-block" /}
{block name="sub-wrapper"}
<!--内容容器-->
<section id="sub-wrapper" class="full-screen page-receipt">
    <div id="sub-content">
        <div id="sub-header">
            <div class="sub-title"><h3><i class="fa fa-tasks"></i>任务--接单管理</h3></div>
            <div class="sub-tools">
                <div id="searchTool">
                    <form class="form-inline" >
                        <input size="30" class="form-control" id="phname" placeholder="请输入任务名称进行检索" />

                        <a class="btn btn-primary" id="searchname"><i class="fa fa-search"></i>搜索</a>
                        <a class="btn btn-info" id="delSearch"><i class="fa fa-search"></i>清空搜索</a>
                    </form>
                </div>
            </div>
        </div>

        <div class="table-responsive data-table">
            <table class="table table-striped table-bordered table-hover">
                <thead>
                <tr>
                    <!-- <th class="text-center" width="34px">
                        <input type="checkbox" class="checkboxes" id="selectAll"  />
                    </th> -->
                    <th>taskID</th>
                    <th>关联任务</th>
                    <th>接单用户</th>
                    <th>接单时间</th>
                    <th>提交时间</th>
                    <th>状态</th>
                    <!-- <th>提交内容</th> -->
                    <!-- <th>审验结果</th> -->
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="taskuser" id="v" empty="$empty" }
                <tr>
                    <!-- <td class="text-center">
                        <input type="checkbox" class="checkboxes" name="checkbox[]" />
                    </td> -->
                    <td>{$v.task_id}</td>
                    <td>{$v.tname}</td>
                    <td>{$v.username}</td>
                    <td>{$v.receive_at}</td>
                    <td>{$v.submit_at}</td>
                    <td>
                    {if condition = "$v.status eq '1'"}
                    未提交
                    {elseif condition = "$v.status eq '2'"}
                    已提交
                    {elseif condition = "$v.status eq '3'"}
                    被用户取消
                    {elseif condition = "$v.status eq '4'"}
                    未通过审核
                    {elseif condition = "$v.status eq '5'"}
                    通过审核
                    {/if}
                    </td>
                    <!-- <td>{$v.content}</td> -->
                    <!-- <td>{$v.conclusion}</td> -->
                    <td>
                        <ul class="record-tool">
                            <li><a class="btn btn-warning btn-sm viewRecord" data-task="{$v.task_id}" data-user="{$v.user_id}">查看</a></li>
                            <li><a class="btn btn-info btn-sm examineRecord" data-task="{$v.task_id}" data-user="{$v.user_id}">审核</a></li>
                            <!--<li><a class="btn btn-warning btn-sm editRecord" data-task="{$v.task_id}" data-user="{$v.user_id}">修改</a></li>-->

                        </ul>
                    </td>
                </tr>
                {/volist}
                </tbody>
                <tfoot>
                <tr>
                    <td colspan="3" class="">
                        {$page}
                        <!--<ul class="pagination">
                            <li>
                                <a href="#" aria-label="Previous">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                            </li>
                            <li class="active"><a href="#">1</a></li>
                            <li><a href="#">2</a></li>
                            <li><a href="#">3</a></li>
                            <li><a href="#">4</a></li>
                            <li><a href="#">5</a></li>
                            <li><a href="#">...</a></li>
                            <li><a href="#">999</a></li>
                            <li>
                                <a href="#" aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>
                        </ul>-->
                    </td>
                    <td colspan="2" class="text-center">
                        <div class="table-summary">
                            <div class="input-group">
                                <div class="input-group-addon">到第</div>
                                <input type="text" class="form-control" id="goto" placeholder="" style="width:40px;">
                                <div class="input-group-addon">页</div>
                                <span class="input-group-btn">
                                            <a class="btn btn-primary" data-currentPage="{$currentPage}" data-lastPage="{$lastPage}" id="gotoPage"><i class="fa fa-arrow-right"></i>确定</a>
                                        </span>
                            </div>
                        </div>
                    </td>
                    <td colspan="2" class="text-center">
                        共<span id="total-record" class="text-success fa-2x"> {$count} </span>条记录
                    </td>
                </tr>
                </tfoot>
            </table>
        </div>
    </div>
</section>

{/block}

{block name="viewRecord"}
<!--编辑工具-->
<div id="viewRecord" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <div class="modal-body">
                <div class="col-xs-12">
                    <table class="table table-striped table-bordered table-hover"  >
                        <thead>
                        <tr>
                            <th>相关内容</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                    </table>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="modal-footer">
                <a class="btn btn-warning" data-dismiss="modal"><i class="fa fa-times"></i>关闭</a>
            </div>
        </div>
    </div>
</div>
<!--编辑工具-->
{/block}
{block name="modal-video"}
<!--编辑工具-->
<div id="modal-video" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <!--<div class="modal-body">-->
            <div class="modal-body col-xs-12">
                <video id="custom-video" autoplay muted>

                </video>
            </div>
            <div class="clearfix"></div>
            <!-- </div>-->
            <div class="modal-footer">
                <a class="btn btn-warning" data-dismiss="modal"><i class="fa fa-times"></i>关闭</a>
            </div>
        </div>
    </div>
</div>
<!--编辑工具-->
{/block}

{block name="examineRecord"}
<!--编辑工具-->
<div id="examineRecord" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <div class="modal-body">
                <div class="col-xs-12">
                    <form class="form-horizontal" name="examineForm">
                        <div class="form-group">
                            <label>是否通过</label>
                            <input type="radio" class="status s1" name="status"  value="5" checked/> 是
                            <input type="radio" class="status s0" name="status"  value="4"/> 否
                        </div>
                        <div class="form-group conclusion" style="display: none">
                            <label for="conclusion">反馈意见</label>
                            <textarea class="form-control" id="conclusion" name="conclusion">
                            </textarea>
                        </div>
                    </form>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="modal-footer">
                <a class="btn btn-warning" data-dismiss="modal"><i class="fa fa-times"></i>关闭</a>
            </div>
        </div>
    </div>
</div>
<!--编辑工具-->
{/block}

